import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store"
import FastClick from "fastclick"
import VueLazyload from "vue-lazyload"
import toast from "./components/common/toast/index"

Vue.config.productionTip = false

// 将$bus赋值给一个Vue实例
Vue.prototype.$bus = new Vue()
//安装toast插件
Vue.use(toast)//当使用Vue.use的时候就会执行toast的install函数

//使用懒加载插件
Vue.use(VueLazyload, {
  loading: require('./assets/images/common/placeholder.png')
})

//解决移动端300毫秒的延迟
FastClick.attach(document.body)

new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
